package com.oneinlet

/**
 * Created by WangZiHe on 2018/5/13
 * QQ/WeChat:648830605
 * QQ-Group:368512253
 * Blog:www.520code.net
 * Github:https://github.com/yancheng199287
 */

/**
 * 集合类增强操作
 * @author  WangZihe
 */
object YCollections {

    fun isEmpty(c: Collection<*>?): Boolean {
        return c == null || c.isEmpty()
    }

    fun isNotEmpty(c: Collection<*>?): Boolean {
        return c != null && c.isNotEmpty()
    }

    fun isEmpty(m: Map<*, *>?): Boolean {
        return m == null || m.isEmpty()
    }

    fun isNotEmpty(m: Map<*, *>?): Boolean {
        return m != null && m.isNotEmpty()
    }

}